package com.airticketbooking.mapper;

import com.airticketbooking.dto.OrderDTO;
import com.airticketbooking.po.Order;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;
/**
 * @author Mr.J
 * @version 1.0.0
 * @Date 2024/11/11
 * @desc
 */

@Mapper
public interface OrderMapper {
	@Select("SELECT * FROM airticketbooking.order WHERE `order`.order_id = #{orderId}")
	Order getOrderById(Integer orderId);

	List<Order> querylist(OrderDTO orderDTO);


	void addOrder(Order order);

	void modifyOrder(Order order);


	@Select("SELECT * FROM airticketbooking.order WHERE `order`.user_id = #{userId}")
	List<Order> getByUserId(Integer userId);


	@Select("SELECT * FROM airticketbooking.order")
	List<Order> getAll();

	List<Order> ordersWhichcompletedInRangeTime(Date startTime, Date endTime);


}
